package com.zzyl.nursing.job;

import com.zzyl.nursing.service.IContractService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component("ContractJob")
@Slf4j
public class MyJob {

    @Autowired
    private IContractService contractService;

    public void updateContractStatus() {
        log.info("1.开始处理合同状态");
        Boolean result = contractService.updateContractStatus();
        if (result) {
            log.info("2.处理合同状态成功任务结束！");
        } else {
            log.info("2.暂无合同处理！");
        }
    }
}